第 14 步:我们快完成了!现在我们只需要告诉用户我们的预测结果。

请记住,当我们想在string中使用number时,我们需要使用str()对其进行转换。

  • 在,将Convert to String拖到程序底部。
  • 将括号内的变量从my_var更改为predicted_sleep 。
  • 将=符号左侧的变量从my_var为sleep_string 。

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)